using SumerCoreDevOps.Shared.Enums;

namespace SumerCoreDevOps.Shared.Models;

/// <summary>
/// TCP 消息头
/// </summary>
public class TcpMessageHeader
{
    /// <summary>
    /// 魔术头
    /// </summary>
    public ushort MagicHeader { get; set; }

    /// <summary>
    /// 协议版本
    /// </summary>
    public byte Version { get; set; }

    /// <summary>
    /// 消息类型
    /// </summary>
    public TcpMessageType MessageType { get; set; }

    /// <summary>
    /// 压缩标志（0=不压缩，1=Gzip压缩）
    /// </summary>
    public byte CompressionFlag { get; set; }

    /// <summary>
    /// 数据长度
    /// </summary>
    public int DataLength { get; set; }
}
